<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:composite="http://java.sun.com/jsf/composite">

<composite:interface>
	<composite:attribute name="editavel" default="true"/>
	<composite:attribute name="valor" required="true"/>
	<composite:attribute name="label" required="true"/>
	<composite:attribute name="obrigatorio" default="true"/>
	<composite:attribute name="style"/>
	<composite:attribute name="readonly" default="false"/>
	<composite:attribute name="validador"/>
	<composite:attribute name="useConverter" default="true" />
	<composite:attribute name="mascara" default="99999999"/>
	<composite:attribute name="maxlength" default="8"/>
	<composite:attribute name="size" default="8"/>
</composite:interface>

<composite:implementation>
	
	<h:outputText id="#{cc.id}_Label" converter="NumeroConverter" value="#{cc.attrs.valor}" rendered="#{not cc.attrs.editavel}" style="font-weight:normal;#{cc.attrs.styleSomenteLeitura}"/>
		
	<p:inputMask id="#{cc.id}_InputNumber" value="#{cc.attrs.valor}" title="#{cc.attrs.label}" required="#{cc.attrs.obrigatorio}" 
				maxlength="#{cc.attrs.maxlength}" size="#{cc.attrs.size}" label="#{cc.attrs.label}"
				mask="#{cc.attrs.mascara}"
		  	    rendered="#{cc.attrs.editavel}" style="#{cc.attrs.style}">
		
		<c:if test="#{cc.attrs.useConverter}">
			<f:converter converterId="NumeroConverter"/>
		</c:if>
	
	</p:inputMask>
			
</composite:implementation>



</html>